package com.itic.mall.timer.jdmoney;

import java.util.Date;

import com.itic.appbase.framework.utils.CalendarHelper;
import com.itic.appbase.framework.utils.DateHelper;
import com.itic.mall.mobile.base.BaseMobileInterface;

public class JdMoneyTimer extends BaseMobileInterface {


    public void execute() {
    	//同步到23号的京东收益信息
    	/*String initDate = "2017-11-23 00:00:00";//初始日期
		String nowDate = DateHelper.formatDateTime(new Date());
		
    	while (DateHelper.isGreater(nowDate, initDate)) {
    		//遍历24次
    		System.out.println(nowDate);
    		Date dateBefore = CalendarHelper.getDateBefore(DateHelper.getDateByStringDate(nowDate), 1);
    		nowDate = DateHelper.formatDateTime(dateBefore);
    		String forDate = DateHelper.getDateStringByDate(dateBefore, "yyyyMMdd");
    		//productJdService.syncJdMoney(forDate);
    	}*/
    	
    	//orderJdService.syncJdOrder();
    	//同步当前时间的订单
    	Date dateBefore = CalendarHelper.getDateBefore(new Date(), 26);
  		String dateStringByDate = DateHelper.getDateStringByDate(dateBefore, "yyyyMMdd");
  		//subSyncJdOrder(dateStringByDate);
  		//String dateStringByDate = "20180212";
  		//orderJdService.subSyncJdOrderOver(dateStringByDate);
  		int hour=24;
  		for( int i=hour;i>=0;i-- ){	
  			orderJdService.subSyncJdOrderOver(dateStringByDate+i+"");
  		}
    }
    
  
    
}